1. Field of the Invention
The present invention relates to arts for a printer connectable to a network and to a controller therefor. More particularly, the present invention relates to arts for a multitask program that is executed by this controller.
2. Description of the Related Art
As network technology has advanced in recent years, printers have come to be connected to a network via a network interface and shared by a plurality of host computers.
This network interface is equipped with a dedicated processor and a buffer, and communicates with the host computers by a specific protocol, thereby receiving print job data and storing them in the buffer. The controller connected to the printer unit is also equipped with a processor, and prints by receiving image data stored in the network interface buffer whenever necessary, while generating image data and issuing control commands to a print engine.
Specifically, with the above-mentioned conventional network printer, the network interface and the controller each have a processor, and the network interface and the controller are connected by internal dedicated buses. Consequently, the processor of the controller performs its print control while making image data transmission requests to the network interface so that there is no undesired variance in the printing results, without any consideration given to controlling the communication with the host computers.
The gist of the present invention is a printer controller in which the processor of the controller for controlling printing exclusively executes a first task (printing task) for controlling a print engine, a second task (communication task) for controlling communication with host computers, and a third task (language task) for generating image data, wherein priorities of execution are assigned in the order of printing task, communication task, and language task. When there is a request for the execution of a task with a higher priority during the execution of a task with a lower priority, the processor executes the higher priority task whose execution has been requested instead of the lower priority task currently being executed.
For example, when a communication interrupt occurs during the execution of a language task, which has a lower priority than a communication task, the processor commences the execution of the communication task instead of the language task currently being executed. If image data transfer request interrupt occurs during the execution of either a communication task or a language task, which have a lower priority than a printing task, the processor commences the execution of the printing task instead of the task currently being executed.
Typically, the present invention is realized by a program for controlling a printer and by a processor that executes this program. The program includes communication control means for controlling communication with host computers; language control means for generating image data; print control means for controlling a print engine; and execution means for exclusively executing either the communication control means, the language control means, or the print control means. Here, the print control means is assigned a higher priority than either the communication control means or the language control means, and the communication control means is assigned a higher priority than the language control means. The program is stored on a recording medium. Examples of recording media include ROM and RAM, as well as a hard disk (HD), DVD-RAM, DVD-ROM, a flexible disk (FD), and CD-ROM.